package test.nine;

class FilterAdapter implements Processer{
	Filter filter=new Filter();
	public FilterAdapter(Filter filter){
		this.filter=filter;
	}
	@Override
	public String name() {
		return filter.name();
	}
	@Override
	public Object process(Object input) {
		return filter.process((Waveform)input);
	}
}

public class FilterProcessor{
	public static void main(String[] args) {
		Waveform w=new Waveform();
		Apply.process(new FilterAdapter(new LowPass(1.0)), w);
		Apply.process(new FilterAdapter(new HighPass(2.0)), w);
		Apply.process(new FilterAdapter(new BandPass(3.0,4.0)), w);
	}
}
